<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../../js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">

        $(function (){
           // let citys = $("#city li");
           // for(li of citys){
           //     alert($(li).html())
           // }
            let citys = $("#city li");
                citys.each(function (index,element){
                alert(index);
                alert($(element).html())
            })
        });
    </script>
</head>
<body>
<ul id="city">
    <li>北京</li>
    <li>上海</li>
    <li>天津</li>
    <li>重庆</li>
</ul>
</body>
</html>
